<template>
	<view>
		<view class="selfuser">
			<view class="text">用户编号:</view>
			<input class="input" type="text" v-model="selfuser" placeholder-class="placehoder" placeholder="自己的用户编号" />
		</view>
		<view class="selfuser">
			<view class="text">房间编号:</view>
			<input class="input" type="text" v-model="roomnum" placeholder-class="placehoder" placeholder="房间编号" />
		</view>
		<view class="btnview">
			<button class="btn white"  @click="goRoom">进入房间</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				selfuser:'user2',//自己的用户编号
				roomnum:'123456',//房间号
			}
		},
		methods: {
			goRoom(){
				var self = this;
				if(!self.selfuser || self.selfuser.length ==0){
					self.$util.showToast("请输入自己的用户编号"); 
					return;
				}
				if(!self.roomnum || self.roomnum.length ==0){
					self.$util.showToast("请输入房间编号"); 
					return;
				}
				self.$util.navigateTo('/pages/shipin/videoroom?roomId='
				+self.roomnum +'&roomName='+ self.roomnum + '&userName=' +self.selfuser +'&userid=' + self.selfuser );
			}
		}
	}
</script>

<style lang="scss">
	.selfuser{
		display: flex;
		align-items: center;
		padding:10rpx;
		height: 80rpx;
	}
	.text{
		font-size: 32rpx;
		line-height: 60rpx;
		height: 80rpx; 
		align-items: center;
		display: flex;
		padding-right: 20rpx;
	}
	.input{
		font-size: 32rpx;
		line-height: 60rpx;
		flex: 1;
		border: 2rpx #eee solid;
		height: 80rpx;
	}
	.btnview {
		margin: 20rpx; 
	}
	.btn {
		width: 100%;
		height: 80rpx;
		border-radius: 10rpx;
		font-size: 32rpx;
		line-height: 80rpx;
	}
	
	.white {
		color: #ffffff;
		background-color: #4F91E2;
	}
	
	.placehoder{
		padding-left: 10rpx;
	}
</style>
